package com.bh.extend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.DictLabelVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 客户地址对象 jc_receivingparty
 *
 * @author slx
 * @date 2023-04-02
 */
@ApiModel(value = "客户地址对象", description = "客户地址对象")
@EqualsAndHashCode(callSuper = true)
@TableName("jc_receivingparty")
@Data
public class JcReceivingParty extends DictLabelVo {

    


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Integer status = 1;
    private String createName;
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String modifyName;
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    private String description;
    //
    private String name;

    /**
     * 地址
     */
    @ApiModelProperty("地址")
    @Excel(name = "地址")
    private String address;

    /**
     * 地址类型
     */
    @ApiModelProperty("地址类型")
    @Excel(name = "地址类型")
    private String addressType;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String contactperson;

    /**
     * 电话
     */
    @Excel(name = "电话")
    private String iphone;

    /**
     * 经纬度
     */
    @Excel(name = "经纬度")
    private String ltl;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private Long orderby;

    /**
     * 组织机构
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "组织机构")
    private Long jcOrganizationId;

    @Dict(dictTable = "jc_zone", dictLabel = "name", dictValue = "id")
    private String jcZones;
    @TableField(exist = false)
    private String jcZonesDtLabel;

    /**
     * 行政区域ID (默认区县ID)
     */
    @Dict(dictTable = "jc_zone", dictLabel = "name", dictValue = "id")
    @Excel(name = "行政区域ID")
    private Long jcZoneId;
    @TableField(exist = false)
    private String jcZoneIdDtLabel;


    private Long jcServerZoneId;

    /**
     * 详细地址
     */
    @Excel(name = "详细地址")
    private String detaileAddress;

    /**
     * 客户ID
     */
    @Dict(dictTable = "jc_customer", dictLabel = "name", dictValue = "id")
    @Excel(name = "客户ID")
    private Long customerId;

    /**
     * 是否默认 1:是，0：否
     */
    @Excel(name = "是否默认,")
    private Integer isDefault;

    /**
     * 行政区划code
     */
    @Excel(name = "行政区划code")
    private String zoneCode;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("createName", getCreateName())
                .append("createTime", getCreateTime())
                .append("description", getDescription())
                .append("modifyName", getModifyName())
                .append("modifyTime", getModifyTime())
                .append("name", getName())
                .append("status", getStatus())
                .append("address", getAddress())
                .append("contactperson", getContactperson())
                .append("iphone", getIphone())
                .append("ltl", getLtl())
                .append("orderby", getOrderby())
                .append("jcOrganizationId", getJcOrganizationId())
                .append("jcZoneId", getJcZoneId())
                .append("detaileAddress", getDetaileAddress())
                .append("customerId", getCustomerId())
                .append("zoneCode", getZoneCode())
                .toString();
    }
}
